<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,IE=9,chrome=1"><meta name="generator" content="MATLAB R2018b"><title>Untitled</title><style type="text/css">.rtcContent { padding: 30px; } .CodeBlock { background-color: #F7F7F7; margin: 10px 0 10px 0;}
.S0 { border-left: 0.833333313465118px solid rgb(233, 233, 233); border-right: 0.833333313465118px solid rgb(233, 233, 233); border-top: 0.833333313465118px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S1 { border-left: 0.833333313465118px solid rgb(233, 233, 233); border-right: 0.833333313465118px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S2 { border-left: 0.833333313465118px solid rgb(233, 233, 233); border-right: 0.833333313465118px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 0.833333313465118px solid rgb(233, 233, 233); border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S3 { color: rgb(64, 64, 64); padding: 10px 0px 6px 17px; background: rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234001159668px;  }
.S4 { border-left: 0.833333313465118px solid rgb(233, 233, 233); border-right: 0.833333313465118px solid rgb(233, 233, 233); border-top: 0.833333313465118px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 6px 45px 0px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S5 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;  }
.S6 { border-left: 0.833333313465118px solid rgb(233, 233, 233); border-right: 0.833333313465118px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 0.833333313465118px solid rgb(233, 233, 233); border-radius: 0px 0px 4px 4px; padding: 0px 45px 4px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S7 { border-left: 0.833333313465118px solid rgb(233, 233, 233); border-right: 0.833333313465118px solid rgb(233, 233, 233); border-top: 0.833333313465118px solid rgb(233, 233, 233); border-bottom: 0.833333313465118px solid rgb(233, 233, 233); border-radius: 0px; padding: 6px 45px 4px 13px; line-height: 17.234001159668px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px;  }
.S8 { margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left;  }
.S9 { margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left;  }
.S10 { margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;  }</style></head><body><div class = rtcContent><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S0'><span style="white-space: pre;"><span>clear</span></span></div></div><div class="inlineWrapper"><div  class = 'S1'></div></div><div class="inlineWrapper"><div  class = 'S1'><span style="white-space: pre;"><span>syms </span><span style="color: rgb(160, 32, 240);">z</span></span></div></div><div class="inlineWrapper"><div  class = 'S1'></div></div><div class="inlineWrapper"><div  class = 'S1'></div></div><div class="inlineWrapper"><div  class = 'S1'></div></div><div class="inlineWrapper outputs"><div  class = 'S2'><span style="white-space: pre;"><span>N_1 = 1 - z</span></span></div><div  class = 'S3'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="F02233E1" data-testid="output_0" data-width="467" data-height="27" data-hashorizontaloverflow="false" style="width: 496px; max-height: 261px;"><div class="symbolicElement"><span class="embeddedOutputsVariableElement">N_1 =&nbsp;</span><span class="MathEquation inlineSymbolicElement" style="font-size: 15px;"><span style="vertical-align: -5px;"><img src="" width="33.5" height="17.5"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>figure</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S2'><span style="white-space: pre;"><span>fplot(N_1, [0, 1])</span></span></div><div  class = 'S3'><div class="inlineElement eoOutputWrapper embeddedOutputsFigure" uid="DF5F2967" data-testid="output_1" style="width: 496px;"><div class="figureElement"><div class="figureContainingNode" style="width: 560px; max-width: 100%; display: inline-block;"><div class="GraphicsView" data-dojo-attach-point="graphicsViewNode,backgroundColorNode" id="uniqName_197_114" widgetid="uniqName_197_114" style="width: 100%; height: auto;"><img class="ImageView figureImage" data-dojo-attach-point="imageViewNode" draggable="false" ondragstart="return false;" id="uniqName_197_116" widgetid="uniqName_197_116" src="" style="width: 100%; height: auto;"></div></div></div></div></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper outputs"><div  class = 'S2'><span style="white-space: pre;"><span>N_2 = z</span></span></div><div  class = 'S3'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="5C8DC57A" data-testid="output_2" data-width="467" data-height="27" data-hashorizontaloverflow="false" style="width: 496px; max-height: 261px;"><div class="symbolicElement"><span class="embeddedOutputsVariableElement">N_2 =&nbsp;</span><span class="MathEquation inlineSymbolicElement" style="font-size: 15px;"><span class="MathRoot HBox" style="display: inline-block; position: relative;"><span style="font-family: STIXGeneral, STIXGeneral-webfont, serif; font-style: italic; font-weight: normal;">z</span></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S4'><span style="white-space: pre;"><span>figure</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S2'><span style="white-space: pre;"><span>fplot(N_2, [0, 1])</span></span></div><div  class = 'S3'><div class="inlineElement eoOutputWrapper embeddedOutputsFigure" uid="0A82D1B4" data-testid="output_3" style="width: 496px;"><div class="figureElement"><div class="figureContainingNode" style="width: 560px; max-width: 100%; display: inline-block;"><div class="GraphicsView" data-dojo-attach-point="graphicsViewNode,backgroundColorNode" id="uniqName_197_117" widgetid="uniqName_197_117" style="width: 100%; height: auto;"><img class="ImageView figureImage" data-dojo-attach-point="imageViewNode" draggable="false" ondragstart="return false;" id="uniqName_197_119" widgetid="uniqName_197_119" src="" style="width: 100%; height: auto;"></div></div></div></div></div></div></div><h2  class = 'S5'><span></span></h2><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S0'></div></div><div class="inlineWrapper"><div  class = 'S6'></div></div></div><h2  class = 'S5'><span></span></h2><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S0'><span style="white-space: pre;"><span>syms </span><span style="color: rgb(160, 32, 240);">X</span></span></div></div><div class="inlineWrapper"><div  class = 'S1'><span style="white-space: pre;"><span>syms </span><span style="color: rgb(160, 32, 240);">L</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S2'><span style="white-space: pre;"><span>N_1 = subs(N_1, z, X/L)</span></span></div><div  class = 'S3'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="CFDFA660" data-testid="output_4" data-width="467" data-height="61" data-hashorizontaloverflow="false" style="width: 496px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">N_1 =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -15px;"><img src="" width="38" height="33.5"></span></span></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S7'><span style="white-space: pre;"><span>N_2 = subs(N_2, z, X/L)</span></span></div><div  class = 'S3'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="5DE3FC52" data-testid="output_5" data-width="467" data-height="61" data-hashorizontaloverflow="false" style="width: 496px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">N_2 =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -15px;"><img src="" width="13.5" height="33.5"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper outputs"><div  class = 'S2'><span style="white-space: pre;"><span>N = [N_1; N_2]</span></span></div><div  class = 'S3'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="6EDD85F5" data-testid="output_6" data-width="467" data-height="101" data-hashorizontaloverflow="false" style="width: 496px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">N =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -32px;"><img src="" width="64" height="73.5"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper outputs"><div  class = 'S2'><span style="white-space: pre;"><span class="warning_squiggle_rte">B</span><span> = symhold(</span><span style="color: rgb(160, 32, 240);">'transpose(diff(N, X), X)'</span><span>)</span></span></div><div  class = 'S3'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="868F430E" data-testid="output_7" data-width="467" data-height="61" data-hashorizontaloverflow="false" style="width: 496px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">B =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -15px;"><img src="" width="130.5" height="33.5"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper outputs"><div  class = 'S2'><span style="white-space: pre;"><span>B = transpose(diff(N, X))</span></span></div><div  class = 'S3'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="7C4D8427" data-testid="output_8" data-width="467" data-height="62" data-hashorizontaloverflow="false" style="width: 496px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">B =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -15px;"><img src="" width="65.5" height="35"></span></span></div></div></div></div></div><div  class = 'S8'><img src = "" width = "360" height = "199" alt = "" style = "vertical-align: baseline"></img></div><div  class = 'S9'><span> V is  A*L</span></div><div  class = 'S9'><span>integral over V is A*integral over L</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S0'><span style="white-space: pre;"><span>syms </span><span style="color: rgb(160, 32, 240);">K</span></span></div></div><div class="inlineWrapper"><div  class = 'S1'><span style="white-space: pre;"><span>syms </span><span style="color: rgb(160, 32, 240);">A</span></span></div></div><div class="inlineWrapper"><div  class = 'S1'><span style="white-space: pre;"><span>syms </span><span style="color: rgb(160, 32, 240);">E</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S2'><span style="white-space: pre;"><span class="warning_squiggle_rte">K</span><span> = symhold(</span><span style="color: rgb(160, 32, 240);">'A*int(transpose(B)*E*B, X, 0, L)'</span><span>)</span></span></div><div  class = 'S3'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="B140A701" data-testid="output_9" data-width="467" data-height="62" data-hashorizontaloverflow="false" style="width: 496px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">K =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -12px;"><img src="" width="91" height="34"></span></span></div></div></div></div><div class="inlineWrapper"><div  class = 'S4'></div></div><div class="inlineWrapper"><div  class = 'S1'></div></div><div class="inlineWrapper outputs"><div  class = 'S2'><span style="white-space: pre;"><span>K = A* int(transpose(B) *E* B, X, sym(0), L)</span></span></div><div  class = 'S3'><div class="inlineElement eoOutputWrapper embeddedOutputsSymbolicElement" uid="F7C2E3BE" data-testid="output_10" data-width="467" data-height="101" data-hashorizontaloverflow="false" style="width: 496px; max-height: 261px;"><div class="symbolicElement"><div class="embeddedOutputsVariableElement">K =&nbsp;</div><span class="MathEquation displaySymbolicElement" style="font-size: 15px;"><span style="vertical-align: -32px;"><img src="" width="112" height="73.5"></span></span></div></div></div></div></div><h2  class = 'S5'><span>Local Functions</span></h2><h2  class = 'S10'><span>Helpers</span></h2><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S0'><span style="white-space: pre;"><span style="color: rgb(0, 0, 255);">function </span><span>h = symhold(exprstring)</span></span></div></div><div class="inlineWrapper"><div  class = 'S1'><span style="white-space: pre;"><span>h = evalin(symengine, [</span><span style="color: rgb(160, 32, 240);">'hold(' </span><span>exprstring </span><span style="color: rgb(160, 32, 240);">' )'</span><span>]);</span></span></div></div><div class="inlineWrapper"><div  class = 'S6'><span style="white-space: pre;"><span style="color: rgb(0, 0, 255);">end</span></span></div></div></div></div><br>
<!-- 
##### SOURCE BEGIN #####
clear

syms z



N_1 = 1 - z
figure
fplot(N_1, [0, 1])

N_2 = z
figure
fplot(N_2, [0, 1])
%% 
%%


%% 
%%
syms X
syms L
N_1 = subs(N_1, z, X/L)
N_2 = subs(N_2, z, X/L)

N = [N_1; N_2]

B = symhold('transpose(diff(N, X), X)')

B = transpose(diff(N, X))
%% 
% 
% 
%  V is  A*L
% 
% integral over V is A*integral over L

syms K
syms A
syms E
K = symhold('A*int(transpose(B)*E*B, X, 0, L)')


K = A* int(transpose(B) *E* B, X, sym(0), L)
%% Local Functions
%% Helpers
%%
function h = symhold(exprstring)
h = evalin(symengine, ['hold(' exprstring ' )']);
end
##### SOURCE END #####
--></body></html>